<div class="judul"><?php echo anchor("/info_pengeluaran/",$title);?></div>
<?php
  $uri_segment = $this->uri->segment(3);
  if($uri_segment != "" && $uri_segment != "all"){
      $option = parsing_param2($uri_segment);
      $awal = datefmysql($option['awal']);
      $akhir = datefmysql($option['akhir']);
  }else{
      $awal = date('d/m/Y');
      $akhir = date('d/m/Y');
  }
?>
<div class="data-input">
    <fieldset>
        <legend><?php echo "$formTitle";?></legend>
        <?php
          echo form_open("info_pengeluaran/search");
        ?>
        <fieldset class="field-group">
            <legend>Tanggal</legend>
            <?php echo form_input("awal", $awal, "id='awal' class='tanggal datepicker-input'")?>
            <label class="inline-title">s.d</label>
            <?php echo form_input("akhir", $akhir, "id='akhir' class='tanggal datepicker-input'")?>
        </fieldset>
        <fieldset class="input-process">
            <?php
              echo form_hidden("url", $searchLink);
              echo form_submit('add', 'Cari', 'class=button style=margin-right:2px');
              echo form_button('Batal', 'Batal', 'class=button onClick='."javascript:location.href='".base_url()."index.php/info_pengeluaran/'".'');
            ?>
        </fieldset>
        <?php
          echo form_close();
        ?>
    </fieldset>
</div>
<fieldset>  
<?php
  if($uri_segment == ''){
      echo "<span class='tips'>Silahkan menggunakan opsi pencarian di atas</span>";
  }else{
?>    
<div class="data-list">
    <div style="float: right">
        <span class="cetak" onclick="window.open('<?php echo base_url()."index.php/info_pengeluaran/print_pengeluaran/$uri_segment"?>', 'mywindow', 'width=1000','height=850')">cetak</span>
        <a class="excel" href="<?php echo site_url('info_pengeluaran/export_data').'/'.$uri_segment?>">cetak</a>
    </div>
    <table class="tabel" style="width: 100%">
        <tr>
            <th>No</th>
            <th>Petugas</th>
            <th>Tanggal</th>
            <th>Jumlah (Rp.)</th>
            <th>Keterangan</th>
        </tr>
        <?php
          $offsets = isset ($offset)?$offset:0;
          $no = 1 + $offsets;
          foreach ($listPengeluaran as $row){
        ?>
        <tr class="<?php echo ($no%2)?"even":"odd";?>">
            <td style="text-align: center;width: 5%"><?php echo $no++;?></td>
            <td style="width:20%;"><?php echo $row['petugas'];?></td>
            <td style="width:20%;"><?php echo datefmysql($row['tanggal']);?></td>
            <td style="text-align: right;width:20%;"><?php echo rupiah($row['jumlah']);?></td>
            <td><?php echo $row['keterangan'];?></td>
        </tr>
        <?php
          }
        ?>
    </table>
</div>
<?php
  echo "$pagination";
  }
?>    
</fieldset>       